﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EntityFrameworkLinqQueryVisualizer
{
    public partial class FfQueryForm : Form
    {

        internal string QueryText
        {
            set { this.txtQueryText.Text = value; }
        }

        internal List<EfQueryParamData> QueryParams
        {
            set 
            {
                this.dgQueryParams.AutoGenerateColumns = false;
                this.dgQueryParams.DataSource = value; 
            }
        }
        
        public FfQueryForm()
        {
            InitializeComponent();
        }

        private void FfQueryForm_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Clipboard.SetData(DataFormats.Text, txtQueryText.Text);
        }
    }
}
